package com.mumu.muPictureBackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mumu.muPictureBackend.exception.ErrorCode;
import com.mumu.muPictureBackend.exception.ThrowUtils;
import com.mumu.muPictureBackend.model.dto.user.UserLoginRequest;
import com.mumu.muPictureBackend.model.dto.user.UserRegisterRequest;
import com.mumu.muPictureBackend.model.entity.User;
import com.mumu.muPictureBackend.model.enums.UserRoleEnum;
import com.mumu.muPictureBackend.model.vo.UserVO;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

@Service
public interface UserService extends IService<User> {
    Long userRegister(UserRegisterRequest userRegisterRequest);

    String getEncryptPassword(String password);

    User userLogin(UserLoginRequest userLoginRequest, HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    boolean userLogout(HttpServletRequest request);

    UserVO getUserVO(User user);

    List<UserVO> getUserVOList(List<User> userList);

    UserVO getUserById(Long id);

    void isLoginAdmin(HttpServletRequest httpServletRequest);

    Boolean isAdmin(User user);

}
